﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace AvansRS.Domain
{
     public class TimeBlock
    {
        public virtual int ID { get; set; }

        [Required(ErrorMessage = "Een StartTime invullen is verplicht.")]
        public virtual DateTime StartTime { get; set; }
         
        [Required(ErrorMessage = "Een EndTime invullen is verplicht.")]
        public virtual DateTime EndTime { get; set; }

        public virtual string Description { get; set; }

         public virtual string sTime {
             get
             {
                 return Description + "\t - \t" + StartTime.ToString("HH:mm") + " : " + EndTime.ToString("HH:mm");
             }
         }
    }
}
